import React from "react";
import { Space, Table, Tag } from "antd";

const { Column } = Table;

interface ClassType {
    name: string;
    count: number;
    createDate: Date;
}
function List({ classes }: any) {
    return (
        <Table dataSource={classes}>
            <Column title="班级名称" dataIndex="name" key="name" />
            <Column title="班级人数" dataIndex="count" key="count" />
            <Column title="创建时间" dataIndex="createDate" key="createDate" />

            <Column
                title="Action"
                key="action"
                render={(_: any, record: ClassType) => (
                    <Space size="middle">
                        <a>修改</a>
                        <a>删除</a>
                    </Space>
                )}
            />
        </Table>
    );
}
export default List;
